from django.conf.urls import patterns, url
from django.views import generic
from models import OrganismoFinanciador
from forms import OrganismoFinanciadorForm

import autocomplete_light

urlpatterns = patterns('organismos_financiadores.views',
                       
    (r'^$', 'listar'),
    url(r'^(?P<object_id>\d+)/$', 'ver',name='organismos_fin_ver'),
    (r'^crear/$', 'crear'),
    (r'^(?P<object_id>\d+)/editar/$', 'editar'),
    (r'^(?P<object_id>\d+)/eliminar/$', 'eliminar'),
    url(r'add/$', 
        autocomplete_light.CreateView.as_view(model=OrganismoFinanciador,form_class=OrganismoFinanciadorForm), 
        name='organismo_create'),
    url(r'(?P<pk>\d+)/update/$', generic.UpdateView.as_view(
        model=OrganismoFinanciador,form_class=OrganismoFinanciadorForm ), name='organismo_update'),
)